package org.sfac.common.vo;

public class Result<T> {

    private int status;
    private String message;
    private T data;

    public Result() {
    }

    public Result(int status) {
        this.status = status;
    }

    public Result(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public Result(int status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public int getStatus() {
        return status;
    }

    public int setStatus(int status) {
        this.status = status;
        return status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public enum ResultStatus {
        SUCCESS(200),
        FAILD(500)
        ;
        public int code;

        ResultStatus(int code) {
            this.code = code;
        }
    }
}
